Base class for pretty much all resources
Properties
Name | Returns | Notes | Example |
---|---|---|---|
uniqueId | String | ||
realm | String | ||
principalURL | String | Returns the path to the owner of this resource, if there is a particular owner. Otherwise returns null | |
principalCollectionHrefs | HrefList | Return the hrefs (either fully qualified URLs or absolute paths) to the collections which contain principals. This is to allow user agents to display a list of users to display. Most implementations will only have a single value which will be the path to the users folder. Eg: return Arrays.asList("/users/"); | |
path | Path | Returns the path to the resource as a Path object, which has convenient methods for path manipulation | |
href | String | The path to the resource within the website | |
link | String | Returns a HTML link to this resource, with its name as the text of the link | |
modifiedDate | Date | Returns null, but may be overridden in other classes | |
createDate | Date | Returns null, but may be overridden in other classes | |
accessControlList | Map | ||
asList | ResourceList | ||
oAuth2Providers | Map | ||
attributes | Map |
Methods
Name | Returns | Notes | Example |
---|---|---|---|
find ( path ) | Resource | Find a resource within the website by its path. If the given path is relative it will be evaluated relative to this resource. If absolute it will be evaluated from the website root |
|
find ( p ) | Resource | Find a resource by a path using a Path object | |
closest ( type ) | CommonResource | Find the closest parent (or this resource) which is the current type, ie where parent.is(type) == true | |
closest ( c ) | Resource | Find the closest parent with the given class |
Hide comments
